package com.miaomiao.domain.system;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RoleVo {

    /**
     * 角色ID
     */
    private Long roleId;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 权限字符
     */
    private String roleKey;

    /**
     * 排序
     */
    private Integer roleSort;

    /**
     * 角色状态（0正常 1停用）
     */
    private Boolean status;

    /**
     * 备注
     */
    private String remark;

    private List<Menu> menus;

    public RoleVo(Role role, List<Menu> menus) {
        this.roleId = role.getRoleId();
        this.roleName = role.getRoleName();
        this.roleKey = role.getRoleKey();
        this.roleSort = role.getRoleSort();
        this.status = role.getStatus();
        this.remark = role.getRemark();
        this.menus = menus;
    }
}
